<template>
  <a-modal
    :visible="visible"
    :title="$t('key.shlw')"
    :width="600"
    :okText="$t('button.SubmitReview')"
    @cancel="() => { $emit('cancel') }"
    @ok="confirm"
  >
    <a-form :form="form">
      <a-form-item
        label="审核结果"
        :labelCol="{span: 5,offset: 1}"
        :wrapperCol="{span: 6, offset: 1}">
        <a-select v-decorator="['shzt',
          {
            rules: [{ required: true, message: '请选择导师审核结果!' }],
          }]" >
          <a-select-option value="1">审核通过</a-select-option>
          <a-select-option value="2">审核不通过</a-select-option>
        </a-select>
      </a-form-item>
      <a-form-item
        label="导师审核意见"
        :labelCol="{span: 5,offset: 1}"
        :wrapperCol="{span: 12, offset: 1}">
        <a-textarea v-decorator="['shyj']" />
      </a-form-item>
    </a-form>
  </a-modal>

</template>

<script>
import { STable } from '~'
import { mapState } from 'vuex'
import DetailList from '~/tool/DetailList'
const DetailListItem = DetailList.Item

export default {
  props: ['visible', 'id'],
  components: {DetailList, DetailListItem, STable},
  data () {
    return {
      form: this.$form.createForm(this),
      detail: {
        zqkhztxx: {},
        pyjhkcList: []
      },
      tableData: [],
      zjcolumns: [
        {
          title: '姓名',
          scopedSlots: { customRender: 'xm' }
        },
        {
          title: '职称',
          scopedSlots: { customRender: 'zc' }
        },
        {
          title: '工作单位',
          scopedSlots: { customRender: 'dw' }
        },
        {
          title: '专业',
          scopedSlots: { customRender: 'zy' }
        },
        {
          title: '操作',
          scopedSlots: { customRender: 'action' }
        }
      ]
    }
  },
  computed: {
    ...mapState({
      TYPE0504: state => state.app['TYPE0504']
    })
  },
  created () {
    this.$store.dispatch('app/setDictionary', 'TYPE0504')
  },
  methods: {
    confirm () {
      this.form.validateFields((err, values) => {
        if (err) return
        this.$api.cultivate.lwxxDssh({...values, id: this.id}).then(res => {
          this.$message.success(res.msg)
          this.form.resetFields()
          this.$emit('cancel')
          this.$emit('refresh')
        })
      })
    }
  }
}
</script>

<style>

</style>
